<!-- 设备 》 设备变动 -->

<template>
  <CommonBody>
    <template #search>
      <WebSearch :param="param" noSearch>
        <ParamTab :dict="TAB" whole />
      </WebSearch>
    </template>

    <template #table>
      <ChangeBorrow v-if="param.tab === TAB[0][0]" class="DeviceChange-panel" />
      <ChangeReceive v-if="param.tab === TAB[1][0]" class="DeviceChange-panel" />
      <ChangeFlit v-if="param.tab === TAB[2][0]" class="DeviceChange-panel" />
      <ChangeDeal v-if="param.tab === TAB[3][0]" class="DeviceChange-panel" />
      <ChangeStatus v-if="param.tab === TAB[4][0]" class="DeviceChange-panel" />
    </template>
  </CommonBody>
</template>

<script>
// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'
import CONST from './CONST'

// ============================== 导出组件 ============================== //

export default {
  /**
   * 名称定义 (实际使用名称)
   */
  name: 'DeviceChange',

  /**
   * 组件导入 (Abc.vue + Abc/index.vue)
   */
  ...CORE.components(require.context('./', true, /vue$/)),

  /**
   * 状态数据 (函数返回对象)
   */
  data() {
    return {
      TAB: CONST.TAB,
      param: {
        tab: CONST.TAB[0][0],
      },
    }
  },
}
</script>

<style lang="scss">
@import './index.scss';
</style>
